package com.carpedil.sm.service.impl;

import com.carpedil.sm.dao.UserMapper;
import com.carpedil.sm.po.User;
import com.carpedil.sm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/** @author Administrator */
@Service("userService")
public class UserServiceImpl implements UserService {
  @Qualifier("userMapper")
  @Autowired
  UserMapper userMapper;

  @Override
  @Transactional(rollbackFor = Exception.class)
  public boolean insertUser(User user) {
    int i = userMapper.insertUser(user);
    return i > 0;
  }
}
